package com.yuda.afterexamscore.service.impl;

import java.util.List;

import com.yuda.common.datasource.annotation.Slave;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.yuda.afterexamscore.mapper.ThQuesTypeAnalysisMapper;
import com.yuda.afterexamscore.domain.ThQuesTypeAnalysis;
import com.yuda.afterexamscore.service.IThQuesTypeAnalysisService;

/**
 * 题目分析题号Service业务层处理
 *
 * @author wyn
 * @date 2021-05-12
 */
//xxxx
@Service
public class ThQuesTypeAnalysisServiceImpl implements IThQuesTypeAnalysisService
{
    @Autowired
    private ThQuesTypeAnalysisMapper thQuesTypeAnalysisMapper;

    /**
     * 查询题目分析题号
     *
     * @param uuid 题目分析题号ID
     * @return 题目分析题号
     */
    @Slave
    @Override
    public ThQuesTypeAnalysis selectThQuesTypeAnalysisById(String uuid)
    {
        return thQuesTypeAnalysisMapper.selectThQuesTypeAnalysisById(uuid);
    }
   /*
   * @param id=科目id
   * @return 科目id分析科目名称
   * 查询科分析科目id
   * */
    @Slave
    @Override
    public String selectThQuesTypeAnalysisByArr(int id) {
        return thQuesTypeAnalysisMapper.selectThQuesTypeAnalysisByArr(id);
    }

    /**
     * 查询题目分析题号列表
     *
     * @param thQuesTypeAnalysis 题目分析题号
     * @return 题目分析题号
     */
    @Slave
    @Override
    public List<ThQuesTypeAnalysis> selectThQuesTypeAnalysisList(ThQuesTypeAnalysis thQuesTypeAnalysis)
    {
        return thQuesTypeAnalysisMapper.selectThQuesTypeAnalysisList(thQuesTypeAnalysis);
    }

    /**
     * 新增题目分析题号
     *
     * @param thQuesTypeAnalysis 题目分析题号
     * @return 结果
     */
    @Slave
    @Override
    public int insertThQuesTypeAnalysis(ThQuesTypeAnalysis thQuesTypeAnalysis)
    {
        return thQuesTypeAnalysisMapper.insertThQuesTypeAnalysis(thQuesTypeAnalysis);
    }

    /**
     * 修改题目分析题号
     *
     * @param thQuesTypeAnalysis 题目分析题号
     * @return 结果
     */
    @Slave
    @Override
    public int updateThQuesTypeAnalysis(ThQuesTypeAnalysis thQuesTypeAnalysis)
    {
        return thQuesTypeAnalysisMapper.updateThQuesTypeAnalysis(thQuesTypeAnalysis);
    }

    /**
     * 批量删除题目分析题号
     *
     * @param uuids 需要删除的题目分析题号ID
     * @return 结果
     */
    @Slave
    @Override
    public int deleteThQuesTypeAnalysisByIds(String[] uuids)
    {
        return thQuesTypeAnalysisMapper.deleteThQuesTypeAnalysisByIds(uuids);
    }

    /**
     * 删除题目分析题号信息
     *
     * @param uuid 题目分析题号ID
     * @return 结果
     */
    @Slave
    @Override
    public int deleteThQuesTypeAnalysisById(String uuid)
    {
        return thQuesTypeAnalysisMapper.deleteThQuesTypeAnalysisById(uuid);
    }
    @Slave
    @Override
    public int insertThQuesTypeAnalysisExcel(List<ThQuesTypeAnalysis> list) {
        return thQuesTypeAnalysisMapper.insertThQuesTypeAnalysisExcel(list);
    }
    @Slave
    @Override
    public int  truncateTable() {
        return thQuesTypeAnalysisMapper.truncateTable();
    }
}
